<template>
  <div>
    <div class="box-main">
      <div class="box-lift">
        <test-list v-if="testOverviewShow === '1'" :testPlanId="testPlanId" :projectId="projectId"></test-list>
        <flaw-list v-if="testOverviewShow === '2'" :testPlanId="testPlanId" :projectId="projectId"></flaw-list>
        <report v-if="testOverviewShow === '3'" :testPlanId="testPlanId" :projectId="projectId"></report>
      </div>
      <div class="box-right">
        <el-button @click="goBack" style="margin-bottom: 20px">返回</el-button>
        <el-menu
          default-active="1"
          class="el-menu-vertical-demo"
          @select="(val) => testOverviewShow = val.toString()">
          <el-menu-item index="1">
            <i class="el-icon-menu"></i>
            <span slot="title">测试用例</span>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="el-icon-menu"></i>
            <span slot="title">缺陷</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="el-icon-document"></i>
            <span slot="title">测试报告</span>
          </el-menu-item>
        </el-menu>
      </div>
    </div>
  </div>
</template>
<script>


import TestList from "@/views/project/init/test/testOverview/TestList.vue";
import FlawList from "@/views/project/init/test/testOverview/FlawList.vue";
import Report from "@/views/project/init/test/testOverview/Report.vue";

export default {
  name: "TestOverview",
  components: {Report, FlawList, TestList},

  data() {
    return {
      testOverviewShow:'1'
    }
  },
  props: {
    testPlanId: {
      type: Number,
    },
    projectId: {
      type: Number,
    }
  },
  created() {

  },
  mounted() {
  },
  methods: {
    goBack() {
      this.$emit('getTestPlanId', null)
    },
  }
}
</script>
<style src="@/assets/styles/overview.scss"  lang="scss" scoped></style>
<style scoped lang="scss">

</style>
